<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">















 
 
 
 
 
 
 
  
  


<html>
  <head>
    <script type="text/javascript" language="JavaScript">
    ORIGINAL_PAGE_PATH = "/appengine/docs/java/tools/eclipse.html";
    </script>
    
    
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Using the Google Plugin for Eclipse - Google App Engine - Google Code</title>
<script type="text/javascript"><!--
(function(){function a(){this.t={};this.tick=function(c){this.t[c]=(new Date).getTime()};this.tick("start")}var b=new a;window.jstiming={Timer:a,load:b};if(window.external&&window.external.pageT)window.jstiming.pt=window.external.pageT;})();

var _tocPath_ = '/appengine/docs/_toc.ezt';
var codesite_token = null;
//--></script>
<link href="../../../../css/codesite.pack.04102009.css" type="text/css" rel="stylesheet"></link>
<script src="../../../../js/codesite_head.pack.04102009.js" type="text/javascript"></script>
<script type="text/javascript">CODESITE_CSITimer['load'].tick('bhs');</script>
<link rel="search" type="application/opensearchdescription+xml" title="Google Code" href="http://code.google.com/osd.xml" />

<!--[if IE]><link rel="stylesheet" type="text/css" href="../../../../css/iehacks.css" /><![endif]-->

    <link href="../../../../css/semantic_headers.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/local_extensions.css" rel="stylesheet" type="text/css" />
  </head>

  <body class="gc-documentation">

    
    
    
</a>

<div id="gb">
 <span>
  
    <a id="lang-dropdown" class="dropdown" href="http://code.google.com" onclick="return false;"><img class="globeicon" src="../../../../images/globe2_small.png"/><span>English</span></a>
  
 </span>
</div>

<div class="gbh" style="left: 0pt;"></div>
<div class="gbh" style="right: 0pt;"></div>


<style type="text/css">
  #gc-topnav h1 {
    padding: 0 0 0 6px;
  }
</style>


<div id="gc-container">
<a name="top"></a>
<div id="skipto">
  <a href="#gc-pagecontent">Skip to page content</a>
  <a href="#gc-toc">Skip to main navigation</a>
</div>

<div id="gc-header">
  <div id="logo"><a href="http://code.google.com">
  
  
     <img src="../../../../images/cleardot.gif" height="1px" width="1px" alt="Google Code Home Page" id="gc-logo-img"/>
  
  
  </a></div>
  <div id="search">
    <div id="searchForm" class="searchForm">
      <form id="cse" action="http://www.google.com/cse" accept-charset="utf-8" class="gsc-search-box" onsubmit="executeGSearch(document.getElementById('gsearchInput').value); return false;">
      <noscript>
      <input type="hidden" name="cref" value="http://code.google.com/cse/googlecode-context.xml"/>
      </noscript>
        <table class="gsc-search-box" cellpadding="0" cellspacing="0">
          <tbody>
            <tr>
              <td class="gsc-input">
                <input id="gsearchInput" type="text" name="q" maxlength="2048" class="gsc-input" autocomplete="off" title="Google Code Search" style="width:345px"/>
              </td>
              <td class="gsc-search-button">
                <div id="cs-searchresults" onclick="event.cancelBubble = true;"></div>
                <input title="Search" id="gsearchButton" class="gsc-search-button" name="sa" value="Search" type="submit"/>
              </td>
            </tr>
            <tr>
              <td colspan="2" class="greytext">e.g. "templates" or "datastore"</td>
            </tr>
          </tbody>
        </table>
      </form>
    </div> <!-- end searchForm -->
  </div> <!-- end search -->
</div> <!-- end gc-header -->


<div id="codesiteContent">

<a name="gc-topnav-anchor"></a>
<div id="gc-topnav">
  <h1>Google App Engine</h1>
  <ul id="docs" class="gc-topnav-tabs">

    <li id="home_link">
      <a href="../../../index.html" title="Google App Engine home page">Home</a>
    </li>
  
    <li id="docs_link">
      <a href="../../index.html" class="selected" title="Official Google App Engine documentation">Docs</a>
    </li>
  
    <li id="faq_link">
      <a href="../../../kb/index.html" title="Answers to frequently asked questions about Google App Engine">FAQ</a>
    </li>
  
    <li id="articles_link">
      <a href="../../../articles/index.html" title="Focused articles and tutorials for Google App Engine developers">Articles</a>
    </li>
  
    <li>
      <a href="http://googleappengine.blogspot.com/" title="Official Google App Engine blog">Blog</a>
    </li>
  
    <li>
      <a href="../../../community.html" title="Community home for Google App Engine">Community</a>
    </li>
  
    <li>
      <a href="../../../terms.html" title="Google App Engine terms of service">Terms</a>
    </li>
  
    <li>
      <a href="../../../downloads.html" title="Download Google App Engine">Download</a>
    </li>
  

  </ul>
</div> <!-- end gc-topnav -->

    <div class="g-section g-tpl-170">

      <div class="g-unit g-first" id="gc-toc">
        <ul>
  <li><a href="../../../downloads.html">Downloads</a></li>
  <li><a href="http://code.google.com/status/appengine">System Status</a></li>
  <li><a href="http://code.google.com/p/googleappengine/issues/list">Issue Tracker</a></li>
</ul>
<div class="line"></div>
<ul>
  <li><h2>Getting Started</h2>
    <ul>
      <li><a href="../../whatisgoogleappengine.html">What Is Google App Engine?</a></li>
      <li><a href="../gettingstarted/index.html">Java</a>
        <ul>
              <li><a href="../gettingstarted/introduction.html">Introduction</a></li>
    <li><a href="../gettingstarted/installing.html">Installing the Java SDK</a></li>
    <li><a href="../gettingstarted/creating.html">Creating a Project</a></li>
    <li><a href="../gettingstarted/usingusers.html">Using the Users Service</a></li>
    <li><a href="../gettingstarted/usingjsps.html">Using JSPs</a></li>
    <li><a href="../gettingstarted/usingdatastore.html">Using the Datastore with JDO</a></li>
    <li><a href="../gettingstarted/staticfiles.html">Using Static Files</a></li>
    <li><a href="../gettingstarted/uploading.html">Uploading Your Application</a></li>

        </ul>
      </li>
      <li><a href="../../python/gettingstarted/index.html">Python</a>
        <ul>
            <li><a href="../../python/gettingstarted/introduction.html">Introduction</a></li>
  <li><a href="../../python/gettingstarted/devenvironment.html">The Development Environment</a></li>
  <li><a href="../../python/gettingstarted/helloworld.html">Hello, World!</a></li>
  <li><a href="../../python/gettingstarted/usingwebapp.html">Using the webapp Framework</a></li>
  <li><a href="../../python/gettingstarted/usingusers.html">Using the Users Service</a></li>
  <li><a href="../../python/gettingstarted/handlingforms.html">Handling Forms With webapp</a></li>
  <li><a href="../../python/gettingstarted/usingdatastore.html">Using the Datastore</a></li>
  <li><a href="../../python/gettingstarted/templates.html">Using Templates</a></li>
  <li><a href="../../python/gettingstarted/staticfiles.html">Using Static Files</a></li>
  <li><a href="../../python/gettingstarted/uploading.html">Uploading Your Application</a></li>

        </ul>
      </li>
    </ul>
  </li>
</ul>
<div class="line"></div>
<ul>
  <li><h2>Java <sup class="new">Early Look</sup></h2>
    <ul>
          <li><a href="../overview.html">Overview</a></li>
    <li><a href="../runtime.html">Servlet Environment</a></li>
    <li><a href="../datastore/index.html">Storing Data</a>
      <ul>
            <li><a href="../datastore/overview.html">Overview</a></li>
    <li><a href="../datastore/usingjdo.html">Using JDO</a></li>
    <li><a href="../datastore/dataclasses.html">Defining Data Classes</a></li>
    <li><a href="../datastore/creatinggettinganddeletingdata.html">Creating, Getting and Deleting Data</a></li>
    <li><a href="../datastore/queriesandindexes.html">Queries and Indexes</a></li>
    <li><a href="../datastore/transactions.html">Transactions</a></li>
    <li><a href="../datastore/relationships.html">Relationships</a></li>
    <li><a href="../datastore/usingjpa.html">Using JPA</a></li>
    <li><a href="../javadoc/com/google/appengine/api/datastore/package-summary.html">Low-level API</a></li>

      </ul>
    </li>
    <li><a href="../apis.html">Services</a>
      <ul>
        <li><a href="../memcache/index.html">Memcache</a>
          <ul>
                <li><a href="../memcache/overview.html">Overview</a></li>
    <li><a href="../memcache/usingjcache.html">Using JCache</a></li>
    <li><a href="../javadoc/com/google/appengine/api/memcache/package-summary.html">Low-level API</a></li>

          </ul>
        </li>
        <li><a href="../urlfetch/index.html">URL Fetch</a>
          <ul>
                <li><a href="../urlfetch/overview.html">Overview</a></li>
    <li><a href="../urlfetch/usingjavanet.html">Using java.net</a></li>
    <li><a href="../javadoc/com/google/appengine/api/urlfetch/package-summary.html">Low-level API</a></li>

          </ul>
        </li>
        <li><a href="../mail/index.html">Mail</a>
          <ul>
                <li><a href="../mail/overview.html">Overview</a></li>
    <li><a href="../mail/usingjavamail.html">Using JavaMail</a></li>
    <li><a href="../javadoc/com/google/appengine/api/mail/package-summary.html">Low-level API</a></li>

          </ul>
        </li>
        <li><a href="../images/index.html">Images</a>
          <ul>
                <li><a href="../images/overview.html">Overview</a></li>
    <li><a href="../javadoc/com/google/appengine/api/images/package-summary.html">API Reference</a></li>

          </ul>
        </li>
        <li><a href="../users/index.html">Google Accounts</a>
          <ul>
                <li><a href="../users/overview.html">Overview</a></li>
    <li><a href="../javadoc/com/google/appengine/api/users/package-summary.html">API Reference</a></li>

          </ul>
        </li>
      </ul>
    </li>
    <li><a href="../javadoc/index.html">Javadoc Reference</a></li>
    <li><a href="../jrewhitelist.html">JRE Class White List</a></li>
    <li><a href="../config/index.html">Configuration</a>
      <ul>
            <li><a href="../config/webxml.html">Deployment Descriptor</a></li>
    <li><a href="../config/appconfig.html">App Config</a></li>
    <li><a href="../config/indexconfig.html">Index Config</a></li>
    <li><a href="../config/cron.html">Scheduled Tasks</a></li>

      </ul>
    </li>
    <li><a href="index.html">Tools</a>
      <ul>
            <li><a href="devserver.html">Development Server</a></li>
    <li><a href="uploadinganapp.html">Uploading and Managing</a></li>
    <li><a href="eclipse.html">Google Plugin for Eclipse</a></li>
    <li><a href="ant.html">Using Apache Ant</a></li>

      </ul>
    </li>
    <li><a href="../howto/index.html">How-To</a>
      <ul>
              <li><a href="../howto/unittesting.html">Unit Testing</a></li>

      </ul>
    </li>

    </ul>
  </li>
</ul>
<div class="line"></div>
<ul>
  <li><h2>Python</h2>
    <ul>
          <li><a href="../../python/overview.html">Overview</a></li>
    <li><a href="../../python/runtime.html">CGI Environment</a></li>
    <li><a href="../../python/datastore/index.html">Storing Data</a>
      <ul>
             <li><a href="../../python/datastore/overview.html">Overview</a></li>
     <li><a href="../../python/datastore/entitiesandmodels.html">Entities and Models</a></li>
     <li><a href="../../python/datastore/creatinggettinganddeletingdata.html">Creating, Getting and Deleting Data</a></li>
     <li><a href="../../python/datastore/keysandentitygroups.html">Keys and Entity Groups</a></li>
     <li><a href="../../python/datastore/queriesandindexes.html">Queries and Indexes</a></li>
     <li><a href="../../python/datastore/transactions.html">Transactions</a></li>
     <li><a href="../../python/datastore/typesandpropertyclasses.html">Types and Property Classes</a></li>
     <li><a href="../../python/datastore/gqlreference.html">GQL Reference</a></li>

     <li><span class="tlw-title tlw-expanded">Reference</span>
       <ul>
         <li><a href="../../python/datastore/modelclass.html">Model</a></li>
         <li><a href="../../python/datastore/expandoclass.html">Expando</a></li>
         <li><a href="../../python/datastore/polymodelclass.html">PolyModel</a></li>
         <li><a href="../../python/datastore/propertyclass.html">Property</a></li>
         <li><a href="../../python/datastore/queryclass.html">Query</a></li>
         <li><a href="../../python/datastore/gqlqueryclass.html">GqlQuery</a></li>
         <li><a href="../../python/datastore/keyclass.html">Key</a></li>
         <li><a href="../../python/datastore/functions.html">Functions</a></li>
         <li><a href="../../python/datastore/exceptions.html">Exceptions</a></li>
       </ul>
     </li>

      </ul>
    </li>
    <li><a href="../../python/apis.html">Services</a>
      <ul>
        <li><a href="../../python/memcache/index.html">Memcache</a>
          <ul>
                 <li><a href="../../python/memcache/overview.html">Overview</a></li>
      <li><a href="../../python/memcache/usingmemcache.html">Using Memcache</a></li>
     <li><span class="tlw-title tlw-expanded">Reference</span>
       <ul>
         <li><a href="../../python/memcache/clientclass.html">Client</a></li>
         <li><a href="../../python/memcache/functions.html">Functions</a></li>
       </ul>
     </li>

          </ul>
        </li>
        <li><a href="../../python/urlfetch/index.html">URL Fetch</a>
          <ul>
                 <li><a href="../../python/urlfetch/overview.html">Overview</a></li>
     <li><span class="tlw-title tlw-expanded">Reference</span>
       <ul>
         <li><a href="../../python/urlfetch/fetchfunction.html">The fetch Function</a></li>
         <li><a href="../../python/urlfetch/responseobjects.html">Response Objects</a></li>
         <li><a href="../../python/urlfetch/exceptions.html">Exceptions</a></li>
       </ul>
     </li>

          </ul>
        </li>
        <li><a href="../../python/mail/index.html">Mail</a>
          <ul>
                 <li><a href="../../python/mail/overview.html">Overview</a></li>
     <li><a href="../../python/mail/sendingmail.html">Sending Mail</a></li>
     <li><a href="../../python/mail/attachments.html">Attachments</a></li>
     <li><span class="tlw-title tlw-expanded">Reference</span>
       <ul>
         <li><a href="../../python/mail/emailmessageclass.html">EmailMessage</a></li>
         <li><a href="../../python/mail/emailmessagefields.html">Message Fields</a></li>
         <li><a href="../../python/mail/functions.html">Functions</a></li>
         <li><a href="../../python/mail/exceptions.html">Exceptions</a></li>
       </ul>
     </li>

          </ul>
        </li>
        <li><a href="../../python/images/index.html">Images</a>
          <ul>
                 <li><a href="../../python/images/overview.html">Overview</a></li>
     <li><a href="../../python/images/installingPIL.html">Installing PIL</a></li>
     <li><a href="../../python/images/usingimages.html">Using the Images API</a></li>
     <li><span class="tlw-title tlw-expanded">Reference</span>
       <ul>
         <li><a href="../../python/images/imageclass.html">Image</a></li>
         <li><a href="../../python/images/functions.html">Functions</a></li>
         <li><a href="../../python/images/exceptions.html">Exceptions</a></li>
       </ul>
     </li>

          </ul>
        </li>
        <li><a href="../../python/users/index.html">Google Accounts</a>
          <ul>
                 <li><a href="../../python/users/overview.html">Overview</a></li>
     <li><a href="../../python/users/userobjects.html">User Objects</a></li>
     <li><a href="../../python/users/loginurls.html">Login URLs</a></li>
     <li><a href="../../python/users/adminusers.html">Admin Users</a></li>

     <li><span class="tlw-title tlw-expanded">Reference</span>
       <ul>
         <li><a href="../../python/users/userclass.html">User</a></li>
         <li><a href="../../python/users/functions.html">Functions</a></li>
         <li><a href="../../python/users/exceptions.html">Exceptions</a></li>
       </ul>
     </li>

          </ul>
        </li>
      </ul>
    </li>
    <li><a href="../../python/config/index.html">Configuration</a>
      <ul>
            <li><a href="../../python/config/appconfig.html">App Config</a></li>
    <li><a href="../../python/config/indexconfig.html">Index Config</a></li>
    <li><a href="../../python/config/cron.html">Scheduled Tasks</a></li>

      </ul>
    </li>
    <li><a href="../../python/tools/index.html">Tools</a>
      <ul>
            <li><a href="../../python/tools/devserver.html">Development Server</a></li>
    <li><a href="../../python/tools/uploadinganapp.html">Uploading and Managing</a></li>
    <li><a href="../../python/tools/uploadingdata.html">Uploading Data</a></li>
    <li><a href="../../python/tools/webapp/index.html">webapp Framework</a>
      <ul>
             <li><a href="../../python/tools/webapp/overview.html">Overview</a></li>
     <li><a href="../../python/tools/webapp/running.html">Running the Application</a></li>
     <li><a href="../../python/tools/webapp/requesthandlers.html">Request Handlers</a></li>
     <li><a href="../../python/tools/webapp/requestdata.html">Request Data</a></li>
     <li><a href="../../python/tools/webapp/buildingtheresponse.html">Building the Response</a></li>
     <li><a href="../../python/tools/webapp/redirects.html">Redirects, Headers and Status Codes</a></li>
     

     <li><span class="tlw-title tlw-expanded">Reference</span>
       <ul>
         <li><a href="../../python/tools/webapp/requestclass.html">Request</a></li>
         <li><a href="../../python/tools/webapp/responseclass.html">Response</a></li>
         <li><a href="../../python/tools/webapp/requesthandlerclass.html">RequestHandler</a></li>
         <li><a href="../../python/tools/webapp/wsgiapplicationclass.html">WSGIApplication</a></li>
         <li><a href="../../python/tools/webapp/utilmodule.html">Utility Functions</a></li>
         
       </ul>
     </li>

      </ul>
    </li>
    <li><a href="../../python/tools/libraries.html">Third-party Libraries</a></li>

      </ul>
    </li>
    <li><a href="../../python/howto/index.html">How-To</a>
      <ul>
              <li><a href="../../python/howto/usinggdataservices.html">Google Data Services</a></li>

      </ul>
    </li>

    </ul>
  </li>
</ul>
<div class="line"></div>
<ul>
  <li><h2>Managing Your App</h2>
    <ul>
      <li><a href="../../theadminconsole.html">The Admin Console</a></li>
      <li><a href="../../quotas.html">Quotas</a></li>
      <li><a href="../../billing.html">Billing</a></li>
    </ul>
  </li>
</ul>
<div class="line"></div>
<ul>
  <li><h2>Resources</h2>
    <ul>
      <li><a href="../../../kb/index.html">FAQ</a></li>
      <li><a href="../../../articles/index.html">Articles</a></li>
      <li><a href="http://appengine-cookbook.appspot.com/">Cookbook</a></li>
      <li><a href="http://appgallery.appspot.com/">App Gallery</a></li>
      <li><a href="http://code.google.com/p/googleappengine/">SDK Code</a></li>
      <li><a href="http://code.google.com/p/google-app-engine-samples/">Sample Apps Code</a></li>
      <li><a href="../../../community.html">Discussion Groups</a></li>
    </ul>
  </li>
</ul>
<div class="line"></div>
<ul>
  <li><a href="../../roadmap.html">Product Roadmap</a></li>
  <li><a href="http://code.google.com/p/googleappengine/wiki/SdkReleaseNotes">Release Notes</a></li>
  <li><a href="../../revision_history.html">Revision History</a></li>
</ul>

        <a class="hidden" href="#gc-topnav-anchor">More Google App Engine resource links</a>
      </div>

      <div class="g-unit" id="gc-pagecontent">
        <h1 class="page_title">Using the Google Plugin for Eclipse</h1>



<p>It's easy to use <a href="http://www.eclipse.org/">the Eclipse development environment</a> to develop your Java App Engine application, just as you can to develop any other servlet-based web application. With the Google Plugin for Eclipse, it's even easier. The plugin lets you create, test and upload App Engine applications from within Eclipse.</p>

<p>The Google Plugin for Eclipse also makes it easy to develop applications using <a href="http://code.google.com/webtoolkit">Google Web Toolkit</a> (GWT), to run on App Engine or in any other environment.</p>

<p>This article describes how to install the Google Plugin for Eclipse, create a new App Engine project, and debug it using the development server running within Eclipse.  The article also describes how to use the plugin to upload your project to App Engine.</p>

<p>For more information about the plugin, including how to use it for Google Web Toolkit projects, see <a href="http://code.google.com/eclipse">the Google Plugin for Eclipse documentation</a>.</p>
<br />

<ul>
  <li><a href="#Getting_Eclipse">Getting Eclipse</a></li>
  <li><a href="#Installing_the_Google_Plugin_for_Eclipse">Installing the Google Plugin for Eclipse</a></li>
  <li><a href="#Creating_a_Project">Creating a Project</a></li>
  <li><a href="#Running_the_Project">Running the Project</a></li>
  <li><a href="#Uploading_to_Google_App_Engine">Uploading to Google App Engine</a></li>
  <li><a href="#Running_the_Command_Line_Tools">Running the Command Line Tools</a></li>
</ul>


<h2 id="Getting_Eclipse">Getting Eclipse</h2>

<p>You can get Eclipse from <a href="http://www.eclipse.org/">the Eclipse web site</a>.  The "Eclipse IDE for Java EE Developers" includes all of the components you will need for web application development.</p>

<p>The Google Plugin for Eclipse is available for Eclipse 3.3 (Europa) or Eclipse 3.4 (Ganymede).</p>

<p>In addition to the Google Plugin for Eclipse, we recommend the Web Tools Platform (WTP) plugins for web development.  See <a href="http://download.eclipse.org/webtools/updates/">the Web Tools Platform website</a>.  Among other things, WTP provides editing modes for JSP and HTML files.</p>


<h2 id="Installing_the_Google_Plugin_for_Eclipse">Installing the Google Plugin for Eclipse</h2>

<p>You can install the Google Plugin for Eclipse using the Software Update feature of Eclipse.</p>

<p>To install the plugin, using <b>Eclipse 3.4 (Ganymede)</b>:</p>
<ol>
  <li>Select the <b>Help</b> menu &gt; <b>Software Updates...</b>  The "Software Updates and Add-ons" window opens.</li>
  <li>Select the <b>Available Software</b> tab.  Click the <b>Add Site...</b> button.  The "Add Site" window opens.  For "Location," enter the install location for the Eclipse 3.4 version of the plugin:
    <pre>http://dl.google.com/eclipse/plugin/3.4</pre>
    Click <b>OK</b>.  The dialog closes, and the new location is added to the list of available software.
  </li>
  <li>
    <p>Click the triangle next to the new install location, then click the triangle next to "Google" to display installation options.  Check the boxes next to "Google Plugin for Eclipse 3.4" and "Google App Engine Java SDK".  You can also select the "Google Web Toolkit SDK" if you'd like to use <a href="http://code.google.com/webtoolkit">Google Web Toolkit</a> with your apps.  Click the <b>Install...</b> button.  Follow the prompts to accept the terms of service and install the plugin.</p>
    <p><b>Note:</b> The plugin install process may take several minutes to complete as Eclipse updates dependencies.  See <a href="http://code.google.com/eclipse/docs/faq.html#longinstall">the FAQ</a> for more information.</p>
  </li>
  <li>When the installation is complete, Eclipse prompts you to restart.  Click <b>Yes</b>.  Eclipse restarts.  The plugin is installed.</li>
</ol>

<p>The process for installing the plugin for <b>Eclipse 3.3 (Europa)</b> is similar, but with different prompts and a different install location.  The location for the Google Plugin for Eclipse 3.3 is as follows:</p>

<ul>
  <li>
    <pre>http://dl.google.com/eclipse/plugin/3.3</pre>
  </li>
</ul>

<p>See the Eclipse documentation for more information about Software Update.</p>


<h2 id="Creating_a_Project">Creating a Project</h2>

<p>To create a new App Engine project:</p>

<ol class="doublespace">
  <li>Select the <b>File</b> menu &gt; <b>New</b> &gt; <b>Web Application Project</b>  <i>(If you do not see this menu option, select the <b>Window</b> menu &gt; <b>Reset Perspective...</b>, click <b>OK</b>, then try the <b>File</b> menu again.)</i>  Alternatively, click the New Web Application Project button in the toolbar: <img src="eclipse/new_app_button.png" width="20" height="20" alt="The New Web Application Project button." /></li>
  <li>The "Create a Web Application Project" wizard opens.  For "Project name," enter a name for your project, such as <code>Guestbook</code> for the project described in the <a href="../gettingstarted/index.html">Getting Started Guide</a>.  For "Package," enter an appropriate package name, such as <code>guestbook</code>.</li>
  <li>If you're not using <a href="http://code.google.com/webtoolkit">Google Web Toolkit</a>, uncheck "Use Google Web Toolkit."  Verify that "Use Google App Engine" is checked.</li>
  <li>If you installed the App Engine SDK using Software Update, the plugin is already configured to use the SDKs that were installed.  If you would like to use a separate installation of the App Engine SDK, click <b>Configure SDKs...</b>, and follow the prompts to add a configuration with your SDK's <code>appengine-java-sdk/</code> directory.</li>
  <li>Click <b>Finish</b> to create the project.</li>
</ol>

<p>The wizard creates a directory structure for the project, including a <code>src/</code> directory for Java source files, and a <code>war/</code> directory for compiled classes and other files for the application, libraries, configuration files, static files such as images and CSS, and other data files.  The wizard also creates a servlet source file and two configuration files.  The complete directory structure looks like this:</p>

<pre>
Guestbook/
  src/
    guestbook/
      server/
        GuestbookServlet.java
    META-INF/
      jdoconfig.xml
    log4j.properties
    logging.properties
  war/
    WEB-INF/
      lib/
        <i>...App Engine JARs...</i>
      appengine-web.xml
      web.xml
    index.html
</pre>

<p>The <code>war/</code> directory uses the <a href="http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WCC3.html">WAR</a> standard layout for bundling web applications.  (WAR archive files are not yet supported by the SDK.)  The Eclipse plugin uses this directory for running the development server, and for deploying the app to App Engine.</p>

<p>When Eclipse builds your project, it creates a directory named <code>classes/</code> in <code>war/WEB-INF/</code>, and puts compiled class files here.  Eclipse also copies non-source files found in <code>src/</code> to <code>war/WEB-INF/classes/</code>, including <code>META-INF/</code> and the <code>log4j.properties</code> and <code>logging.properties</code> files.  The final contents of the <code>war/</code> directory make up your application for testing and deployment.</p>

<p>For details about the new project that the plugin creates, see <a href="../gettingstarted/index.html">the Getting Started Guide</a>.</p>


<h2 id="Running_the_Project">Running the Project</h2>

<p>The App Engine SDK includes a web server for testing your application in a simulated environment.  The Google Plugin for Eclipse adds new items to the <b>Run</b> menu for starting this server.</p>

<p>To run your application in the web server inside the Eclipse debugger, select the <b>Run</b> menu, <b>Debug As</b> &gt; <b>Web Application</b>.  Eclipse builds the project, switches to the Debug perspective, and the server starts.  If the server starts successfully, the server displays several messages, including a message similar to the following, in the Console:</p>

<pre>The server is running at http://localhost:8080/</pre>

<p>If you want to customize how the server is started, you can create a new Run/Debug configuration of the type "Web Application."</p>

<p>To test the new application that the plugin created, start the server as above, then visit the following URL in your browser (using a URL path appropriate to your application):</p>

<ul class="nolist"><li><a target="_blank" href="http://localhost:8080/guestbook">http://localhost:8080/guestbook</a></li></ul>

<p>With Eclipse, you can leave the server running in the debugger while you make changes to source code, JSPs, static files and <code>appengine-web.xml</code>.  When you save changes to source code, Eclipse compiles the class automatically, then attempts to insert it into the running web server dynamically.  In most cases, you can simply reload the page in your browser to test the new version of the code.  Changes to JSPs, static files and <code>appengine-web.xml</code> are recognized by the development server automatically, and also take effect without restarting the server.  If you change <code>web.xml</code> or other configuration files, you must stop and start the server for the changes to take effect.</p>

<p>To stop the server, make sure the <b>Debug</b> panel is selected, then click the Terminate button: <img src="eclipse/terminate_button.png" width="22" height="22" alt="The Eclipse terminate button." /></p>


<h2 id="Uploading_to_Google_App_Engine">Uploading to Google App Engine</h2>

<p>The Google Plugin for Eclipse adds several buttons to the Eclipse toolbar.  The App Engine deploy button uploads your application to App Engine: <img src="eclipse/ae_deploy_button.png" width="22" height="22" alt="The App Engine deploy button." /></p>

<p>Before you upload your app for the first time, you must register an application ID with App Engine using <a href="../../theadminconsole.html">the Admin Console</a>.  Register an application ID, then edit the <code>appengine-web.xml</code> file and change the <code>&lt;application&gt;...&lt;/application&gt;</code> element to contain the new ID.</p>

<p>When you click the App Engine deploy button, Eclipse prompts you for your administrator account username (your email address) and password.  Enter your account information and click the <b>Upload</b> button to complete the upload.  Eclipse gets the application ID and version information from the <code>appengine-web.xml</code> file, and uploads the contents of the <code>war/</code> directory.</p>

<p>Test your application on App Engine by visiting its URL:</p>

<ul class="nolist"><li><code>http://<i>&lt;your application ID&gt;</i>.appspot.com/guestbook</code></li></ul>


<h2 id="Running_the_Command_Line_Tools">Running the Command Line Tools</h2>

<p>Some features of the App Engine Java SDK tools are only available by running the tools directly from the command line.  If you have installed the SDK using Eclipse, you can run these tools from the Eclipse plugin installation directory.</p>

<p>The SDK is located in your Eclipse installation directory, under <code>plugins/com.google.appengine.eclipse.sdkbundle_<i>VERSION</i>/</code>, where <code><i>VERSION</i></code> is a version identifier for the SDK.  In this directory is the <code>appengine-java-sdk/bin/</code> subdirectory containing the tools.</p>

<p class="note"><b>Note:</b> If you are using Mac OS X or Linux, you must give the command files executable permission before you can run them.  For example, to give <code>appcfg.sh</code> executable permission, enter the following command from the <code>appengine-java-sdk/bin/</code> directory: <code>chmod u+x appcfg.sh</code></p>

<p>For more information on the features available exclusively from the command line, see <a href="uploadinganapp.html">Uploading and Managing</a>.</p>


      </div><!-- end gc-pagecontent -->
   </div><!-- end gooey wrapper -->

    </div> <!-- end codesite content -->

<div id="gc-footer" dir="ltr">
  <div class="text">
    
      <div class="notice"><div id="notice" style="text-align: center; border: 1em 0em 1em 0em">
  Except as otherwise <a
  href="http://code.google.com/policies.html#restrictions">noted</a>,
  the content of this page is licensed under the <a rel="license"
  href="http://creativecommons.org/licenses/by/2.5/">Creative Commons
  Attribution 2.5 License</a>, and code samples are licensed under the
  <a rel="license" href="http://www.apache.org/licenses/LICENSE-2.0">Apache
  2.0 License</a>.
<!-- <rdf:RDF xmlns="http://web.resource.org/cc/" 
              xmlns:dc="http://purl.org/dc/elements/1.1/"
              xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <Work rdf:about="">
    <license rdf:resource="http://creativecommons.org/licenses/by/2.5/" />
  </Work>
  <License rdf:about="http://creativecommons.org/licenses/by/2.5/">
    <permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
    <permits rdf:resource="http://web.resource.org/cc/Distribution"/>
    <requires rdf:resource="http://web.resource.org/cc/Notice"/>
    <requires rdf:resource="http://web.resource.org/cc/Attribution"/>
    <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
  </License>
</rdf:RDF> -->
</div>
Java is a registered trademark of Sun Microsystems, Inc.</div>
    
    &copy;2009 Google -
    <a href="http://code.google.com">Code Home</a> -
    <a href="http://www.google.com/accounts/TOS">Terms of Service</a> -
    <a href="http://www.google.com/privacy.html">Privacy Policy</a> -
    <a href="http://code.google.com/more">Site Directory</a>
    <br /> <br />
    Google Code offered in:
    <a href="http://code.google.com/intl/en">English</a> -
    <a href="http://code.google.com/intl/es">Español</a> -
    <a href="http://code.google.com/intl/ja">日本語</a> -
    <a href="http://code.google.com/intl/ko">한국어</a> -
    <a href="http://code.google.com/intl/pt-BR">Português</a> -
    <a href="http://code.google.com/intl/ru">Pусский</a> -
    <a href="http://code.google.com/intl/zh-CN">中文(简体)</a> -
    <a href="http://code.google.com/intl/zh-TW">中文(繁體)</a>
  </div>
</div><!-- end gc-footer -->

</div><!-- end gc-containter -->

<script type="text/javascript">CODESITE_CSITimer['load'].tick('ats');</script>
<script src="../../../../js/codesite_tail.pack.04102009.js" type="text/javascript"></script>






  </body>
</html>


